package cc.mrbird.febs.utils;

import cc.mrbird.febs.accounting.dto.detailCost.DetailTotalDTO;

import java.awt.*;
import java.util.*;
import java.util.List;

public class YearMonthMapUtils {
    public final static Map<String, String> yearMonthMap = new HashMap<String, String>() {{
        put("1月", "01");
        put("2月", "02");
        put("3月", "03");
        put("4月", "04");
        put("5月", "05");
        put("6月", "06");
        put("7月", "07");
        put("8月", "08");
        put("9月", "09");
        put("10月", "10");
        put("11月", "11");
        put("12月", "12");
        put("差额", "balance");
    }};

    public final static Set<String> exportAndCalculate = new HashSet<String>() {{
        add("a9b6df5a49fb11ec999e0a80ff2603de");
        add("8210867e4a0311ecba500242ac110002");
    }};

    public final static List<String> monthList = new ArrayList<String>() {{
        add("01");
        add("02");
        add("03");
        add("04");
        add("05");
        add("06");
        add("07");
        add("08");
        add("09");
        add("10");
        add("11");
        add("12");
        add("balance");
    }};

    public static List<DetailTotalDTO> getStandardSubs(Integer excelType) {
        List<DetailTotalDTO> standardSubs = new ArrayList<>();
        standardSubs.add(new DetailTotalDTO("毛利润（预算表）", "【303f416d49fc11ecba500242ac110002】-(【7d9a9f5b49fe11ecba500242ac110002】)-(【9396e2ff4a0311ecba500242ac110002】)-(【d4d63f024a0311ecba500242ac110002】)", 1, 1));
        standardSubs.add(new DetailTotalDTO("毛利润（按实际社保和工会费）", "【303f416d49fc11ecba500242ac110002】-(【7d9a9f5b49fe11ecba500242ac110002】)-(【9396e2ff4a0311ecba500242ac110002】)-(【d4d63f024a0311ecba500242ac110002】)+(【8210867e4a0311ecba500242ac110002】)+(【c22f36054a0311ecba500242ac110002】)-(【644be5cb4a0411ecba500242ac110002】)-(【6a4b2c414a0411ecba500242ac110002】)", 1, 2));
        if (excelType == 1) standardSubs.add(new DetailTotalDTO("其中：自有（驻场）", "【4507048349fc11ecba500242ac110002】-(【7d9a9f5b49fe11ecba500242ac110002】)+【cf70193849fd11ecba500242ac110002】-(【9396e2ff4a0311ecba500242ac110002】)-(【4507048349fc11ecba500242ac110002】)/1.06*0.0675-(【c22f36054a0311ecba500242ac110002】)-(【c6f9e5074a0311ecba500242ac110002】)", 1, 1));
        else standardSubs.add(new DetailTotalDTO("其中：自有（驻场）", "【4507048349fc11ecba500242ac110002】-(【7d9a9f5b49fe11ecba500242ac110002】)+【cf70193849fd11ecba500242ac110002】-(【9396e2ff4a0311ecba500242ac110002】)-(【4507048349fc11ecba500242ac110002】)/1.06*0.0675-(【c22f36054a0311ecba500242ac110002】)-(【c6f9e5074a0311ecba500242ac110002】)+【8210867e4a0311ecba500242ac110002】+【c22f36054a0311ecba500242ac110002】-(【644be5cb4a0411ecba500242ac110002】)-(【6a4b2c414a0411ecba500242ac110002】)", 1, 1));
        standardSubs.add(new DetailTotalDTO("第三方职场", "【8a9959a949fc11ecba500242ac110002】-【cf70193849fd11ecba500242ac110002】-【8a9959a949fc11ecba500242ac110002】/1.06*0.06-(【8a9959a949fc11ecba500242ac110002】/1.06-【cf70193849fd11ecba500242ac110002】+【9f62643849fd11ecba500242ac110002】)*0.06*0.12-【8a9959a949fc11ecba500242ac110002】*0.8*0.0003", 1, 1));

        standardSubs.add(new DetailTotalDTO("毛利润2", "【303f416d49fc11ecba500242ac110002】-(【7d9a9f5b49fe11ecba500242ac110002】)-(【9396e2ff4a0311ecba500242ac110002】)-(【d4d63f024a0311ecba500242ac110002】)+(【8210867e4a0311ecba500242ac110002】)+(【c22f36054a0311ecba500242ac110002】)-(【644be5cb4a0411ecba500242ac110002】)-(【6a4b2c414a0411ecba500242ac110002】)-(【33753bba4a0411ecba500242ac110002】)", 2, 2));

        standardSubs.add(new DetailTotalDTO("营业利润", "【303f416d49fc11ecba500242ac110002】-(【7d9a9f5b49fe11ecba500242ac110002】)-(【9396e2ff4a0311ecba500242ac110002】)-(【d4d63f024a0311ecba500242ac110002】)-(【33753bba4a0411ecba500242ac110002】)+【82c3c5f94a0411ecba500242ac110002】", 3, 2));

        standardSubs.add(new DetailTotalDTO("内部报表成本（杭州项目）", "【664551064a0311ecba500242ac110002】+【20f2bbb64a0411ecba500242ac110002】+【75bab83c4a0311ecba500242ac110002】", 4, 2));
        standardSubs.add(new DetailTotalDTO("内部报表成本（非杭州项目）", "【664551064a0311ecba500242ac110002】+【20f2bbb64a0411ecba500242ac110002】+【6d4f65da4a0311ecba500242ac110002】+【644be5cb4a0411ecba500242ac110002】+【898e67224a0311ecba500242ac110002】", 5, 2));
        return standardSubs;
    }

    public final static Map<String, Color> getColor = new HashMap<String, Color>() {{
        Color blueColor = new Color(154, 203, 255);
        Color redColor = new Color(255, 153, 204);
        put("303f416d49fc11ecba500242ac110002", blueColor);
        put("4507048349fc11ecba500242ac110002", blueColor);
        put("4b0de87d49fc11ecba500242ac110002", blueColor);
        put("52da7f4049fc11ecba500242ac110002", blueColor);
        put("5e34d3cf49fc11ecba500242ac110002", blueColor);
        put("660ee0b649fc11ecba500242ac110002", blueColor);
        put("6b3f25a649fc11ecba500242ac110002", blueColor);
        put("8a9959a949fc11ecba500242ac110002", blueColor);
        put("7d9a9f5b49fe11ecba500242ac110002", blueColor);
        put("d4d63f024a0311ecba500242ac110002", blueColor);
        put("33753bba4a0411ecba500242ac110002", blueColor);
        put("82c3c5f94a0411ecba500242ac110002", blueColor);
        put("14bb514d49fd11ecba500242ac110002", redColor);
        put("2203c7c649fd11ecba500242ac110002", redColor);
        put("29aecf1949fe11ecba500242ac110002", redColor);
        put("5d55949a49fe11ecba500242ac110002", redColor);
        put("741119d849fe11ecba500242ac110002", redColor);
        put("664551064a0311ecba500242ac110002", redColor);
        put("20f2bbb64a0411ecba500242ac110002", redColor);
        put("644be5cb4a0411ecba500242ac110002", redColor);
        put("6a4b2c414a0411ecba500242ac110002", redColor);
        put("7095c4f94a0411ecba500242ac110002", redColor);
    }};

    public final static Map<String, Color> getSubDetailColor = new HashMap<String, Color>() {{
        Color blueColor = new Color(154, 203, 255);
        Color redColor = new Color(255, 153, 204);
        Color ziColor = new Color(204, 153, 255);
        Color huiColor = new Color(192, 192, 192);
        Color huangColor = new Color(250, 192, 144);
        Color huang2Color = new Color(225, 181, 180);
        put("自有收入合计", blueColor);
        put("拓天项目收入", blueColor);
        put("第三方收入合计", blueColor);
        put("费用合计", blueColor);
        put("成本合计", blueColor);
        put("合计", blueColor);
        put("管理成本合计", blueColor);
        put("补助/减免合计", blueColor);
        put("内部报表成本（杭州项目）", blueColor);
        put("内部报表成本（非杭州项目）", blueColor);
        put("节假日及其他福利标准", redColor);
        put("节假日福利及开门红包预提", redColor);
        put("节假日及其他福利", redColor);
        put("赔付差额", redColor);
        put("房租差额", redColor);
        put("水电费差额", redColor);
        put("项目年终预提标准", redColor);
        put("项目年终奖金/年终活动经费预算/其他（预提）", redColor);
        put("年终奖金预提（管理）", redColor);
        put("实际社会保险单位", redColor);
        put("实际工会费", redColor);
        put("实际残保金", redColor);
        put("收入", ziColor);
        put("费用", huiColor);
        put("成本", ziColor);
        put("税费", huiColor);
        put("毛利润（预算表）", huangColor);
        put("其中：自有（驻场）", huiColor);
        put("第三方职场", huiColor);
        put("毛利润（按实际社保和工会费）", huang2Color);
        put("管理成本", ziColor);
        put("毛利润2", huiColor);
        put("补助或减免项", ziColor);
        put("营业利润", huiColor);
    }};
}
